<?xml version="1.0" encoding='Windows-1251'?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN"
  "http://colorer.sf.net/2003/hrc.dtd">
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">

<type name="dtdcatalog">
	<annotation><documentation>
		DTD/SGML Open Entity Catalog,
		 
		as defined in 
		OASIS Technical Resolution 9401:1997
		http://www.oasis-open.org/specs/tr9401.html
		
	</documentation><contributors><![CDATA[
		Eugene Efremov <4mirror@mail.ru>
	]]></contributors>
	<appinfo><problem>
		This stuff must be a part of SGML package, not XML.
		
		Hovewer, SGML standart ISO 8879:1986 not allowed for free.
		Colorer is free, therefore colorer cannot complete support SGML.
	</problem>
		<mime type='application/sgml-open-catalog'/>
	</appinfo>
</annotation>

<region name="badChar" parent="dtd:badChar" description="bad stream"/>

<region name="Comment"       parent="xml:Comment"/>
<region name="Comment.start" parent="xml:Comment.start"/>
<region name="Comment.end"   parent="xml:Comment.end"/>

<region name='Literal'       parent='dtd:Literal'/>
<region name='Literal.start' parent='dtd:Literal.start'/>
<region name='Literal.end'   parent='dtd:Literal.end'/>

<!--  FPI -->
<region name="PubId"       parent="Literal"/>
<region name="PubId.start" parent="Literal.start"/>
<region name="PubId.end"   parent="Literal.end"/>

<!--  FSI -->
<region name="SysId"       parent="Literal"/>
<region name="SysId.start" parent="Literal.start"/>
<region name="SysId.end"   parent="Literal.end"/>

<!--  other -->
<region name='content' parent='dtd:doctypedecl.name'/>
<region name='Names'   parent='content'/>

<region name='Keyword'       parent='xml:decl.name'/> <!-- or   dtd:doctypedecl.attr ? -->
<region name='Keyword.param' parent='xml:decl.content'/>


<scheme name='Comment'>
	<annotation><documentation><![CDATA[
		comment = COM, system character*, COM
		COM = "--"
	]]></documentation></annotation>
	
	<block start='/(--)/' end='/(--)/' 
		scheme='def:Comment' region='Comment'
		region00='Comment.start' region10='Comment.end'
		region01='def:PairStart' region11='def:PairEnd'
	/>
</scheme>


<!-- FPI -->

<scheme name='FPI.content'>
	<inherit scheme='uri:FPI'/>
</scheme>

<scheme name='FPI.literal'>
	<block start="/([&quot;&apos;])/" end="/(\y1)/"
		region00='PubId.start' region01='def:PairStart'
		region10='PubId.end'   region11='def:PairEnd'
		scheme="FPI.content"   region="PubId"
	/>
</scheme>

<scheme name="FPI">
	<inherit scheme='FPI.literal'/>
	<inherit scheme='Comment'/>
</scheme>


<!-- FSI -->

<scheme name='FSI.content'>
	<inherit scheme='uri:uri'/>
</scheme>

<scheme name='FSI.literal'>
	<block start="/([&quot;&apos;])/" end="/(\y1)/"
		region00='SysId.start' region01='def:PairStart'
		region10='SysId.end'   region11='def:PairEnd'
		scheme="FSI.content"   region="SysId"
	/>
</scheme>

<scheme name="FSI">
	<inherit scheme='FSI.literal'/>
	<inherit scheme='def:NetURL'/>
	<inherit scheme='Comment'/>
</scheme>


<!-- entity -->

<entity name='rsch' value='[^\s\\\/\.]'/> <!-- restricted system character -->

<scheme name='literal.content'/>

<scheme name='literal'>
	<block start="/([&quot;&apos;])/" end="/(\y1)/"
		region00='Literal.start' region01='def:PairStart'
		region10='Literal.end'   region11='def:PairEnd'
		scheme="literal.content" region="Literal"
	/>
</scheme>

<scheme name='entity.name'>
	<inherit scheme='literal'/>
	<regexp match='/%rsch;/' region='Names'/>
</scheme>



<!-- 
	ugly hack 
	
	I want:
	<choice>
		<when match='/\bSYSTEM\b/' region0='Keyword' scheme='SysId.conetnt'/>
		<when match='/\b(PUBLIC|DTDDECL|DELEGATE)\b/' region0='Keyword' scheme='SysId.conetnt'/>
		....
	</choice>
-->
<entity name='newkey' value='\M\b(PUBLIC|SYSTEM|(DTD|SGML)DECL|DELEGATE|ENTITY|(DOC|LINK)TYPE|NOTATION|DOCUMENT|BASE|CATALOG|OVERRIDE)\b'/>


<!-- pubId -->
<scheme name='PubId.content'>
	<annotation><documentation><![CDATA[
		(publicid keyword, ps+, public identifier, ps+, FSI specification)
	]]></documentation></annotation>
	
	<block start='/~/' end='/[&quot;&apos;]?#1/' scheme='FPI'/>
	<inherit scheme='FSI'/>
</scheme>

<scheme name='PubId'>
	<annotation><documentation><![CDATA[
		publicid keyword = "PUBLIC" | "DTDDECL"
		("DELEGATE", ps+, partial public identifier, ps+, FSI specification)
	]]></documentation></annotation>
	
	<block start='/\b(PUBLIC|DTDDECL|DELEGATE)\b/' end='/%newkey;/'
		scheme='PubId.content' region00='Keyword' region='content'
	/>
</scheme>



<scheme name='SysId.content'>
	<annotation><documentation><![CDATA[
		("SYSTEM", ps+, system identifier, ps+, FSI specification)
	]]></documentation></annotation>
	
	<block start='/~/' end='/[&quot;&apos;]?#1/' scheme='FSI'/>
	<inherit scheme='FSI'/>
</scheme>

<scheme name='SysId'>
	<block start='/\bSYSTEM\b/' end='/%newkey;/' region='content'
		scheme='SysId.content' region00='Keyword'
	/>
</scheme>



<scheme name='Named.content'>
	<annotation><documentation><![CDATA[
		(name keyword, ps+, entity name spec, ps+, FSI specification) |
	]]></documentation></annotation>
	
	<block start='/~\s+\M([&quot;&apos;])/' end='/\y1?#1/' scheme='entity.name'/>
	<block start='/~\s+\M%rsch;+/' end='/~%rsch;+\m/' scheme='entity.name'/>
	
	<inherit scheme='FPI'/>
	<inherit scheme='entity.name'/>
</scheme>

<scheme name='Named'>
	<annotation><documentation><![CDATA[
		name keyword = "ENTITY" | "DOCTYPE" | "LINKTYPE" | "NOTATION"
	]]></documentation></annotation>
	
	<block start='/\b(ENTITY|(DOC|LINK)TYPE|NOTATION)\b/' end='/%newkey;/'
		scheme='Named.content' region00='Keyword' region='content'
	/>
</scheme>



<scheme name='NoNamed.content'>
	<annotation><documentation><![CDATA[
		(noname keyword, ps+, FSI specification)
	]]></documentation></annotation>
	
	<inherit scheme='FSI'/>
</scheme>

<scheme name='NoNamed'>
	<annotation><documentation><![CDATA[
		noname keyword = "SGMLDECL" | "DOCUMENT" | "BASE" | "CATALOG"
	]]></documentation></annotation>
	
	<block start='/\b(SGMLDECL|DOCUMENT|BASE|CATALOG)\b/' end='/%newkey;/'
		scheme='NoNamed.content' region00='Keyword' region='content'
	/>
</scheme>



<scheme name='NoId.content'>
	<inherit scheme='Comment'/>
</scheme>

<scheme name='NoId'>
	<annotation><documentation><![CDATA[
		no identifier entry = "OVERRIDE", ps+, ("YES" | "NO")
	]]></documentation></annotation>
	
	<block start='/\bOVERRIDE\b/' end='/\b(YES|NO)\b/' scheme='NoId' 
		region00='Keyword' region10='Keyword.param'
	/>
</scheme>



<scheme name='Keywords'>
	<inherit scheme='SysId'/>
	<inherit scheme='PubId'/>
	<inherit scheme='Named'/>
	<inherit scheme='NoNamed'/>
	<inherit scheme='NoId'/>
</scheme>

<scheme name='dtdcatalog'>
	<annotation><documentation><![CDATA[
		catalog = ps*, (catalog entry, (ps+, catalog entry)*, ps*)?
		catalog entry = extended external identifier entry | no identifier entry |
		                other information
		
		other information = keyword, ps+, (symbol | non-symbol token | literal),
		                            (ps+, (non-symbol token | literal))*
		
	]]></documentation></annotation>
	
	<inherit scheme='Keywords'/>
	<inherit scheme='Comment'/>
</scheme>

</type>

</hrc>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is the Colorer Library.
   -
   - The Initial Developer of the Original Code is
   - Eugene Efremov <4mirror@mail.ru>
   - Portions created by the Initial Developer are Copyright (C) 1999-2005
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->
   